﻿CREATE TABLE [dbo].[Teacher_UserGroups]
(
	[SchoolYearID] INT NOT NULL, 
    [TeacherID] INT NOT NULL  PRIMARY KEY, 
    [UserGroupID] INT NOT NULL,
	CONSTRAINT FK_Teacher_UserGroups_UserGroups FOREIGN KEY (UserGroupID) 
    REFERENCES UserGroups (UserGroupID) 
    ON DELETE CASCADE
    ON UPDATE CASCADE,
	CONSTRAINT FK_Teacher_UserGroups_SchoolYears FOREIGN KEY (SchoolYearID) 
    REFERENCES SchoolYears (SchoolYearID) 
    ON DELETE CASCADE
    ON UPDATE CASCADE
)
